package com.zjkj.mp.service.message.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.zjkj.mp.dao.message.TemplateManagerDAO;
import com.zjkj.mp.service.message.TemplateManagerService;
import com.zjkj.mp.utils.PaginatedResult;
import com.zjkj.mp.vo.messageManager.Template;
import com.zjkj.mp.vo.messageManager.TemplateCategory;

@Service
@Transactional(rollbackFor=Exception.class)
public class TemplateManagerServiceImpl implements TemplateManagerService {

	@Autowired
	TemplateManagerDAO templateManagerDAO;
	
	public int updateTemplateCat(TemplateCategory catgCategory)
			throws Exception {
		
		return templateManagerDAO.updateTemplateCat(catgCategory);
	}

	public void createTemplateCat(TemplateCategory catgCategory)
			throws Exception {
		
		templateManagerDAO.createTemplateCat(catgCategory);
	}

	public PaginatedResult findQueryResult(Map map) throws Exception {
		
		return templateManagerDAO.findQueryRsult(map);
	}

	public PaginatedResult findAllQueryResult(Map map) throws Exception {
		
		return templateManagerDAO.findAllQueryRsult(map);
	}

	public int updateTemplateCat(Map map) throws Exception {
		
		return templateManagerDAO.updateTemplateCat(map);
	}

	public int deleteTempCat(Map map) throws Exception {
		
		return templateManagerDAO.deleteTempCat(map);
	}

	public List findAllTemplateTyle(Map map) throws Exception {
		
		return templateManagerDAO.findAllType(map);
	}

	public int updateTemplate(Map map) throws Exception {
		
		return templateManagerDAO.updateTemplate(map);
	}

	public int createTemplate(Map map) throws Exception {
		
		return templateManagerDAO.createTemplate(map);
	}

	public PaginatedResult findAllTemplateList(Map map) throws Exception {
		
		return templateManagerDAO.findAllTemplateList(map);
	}

	public Template findTemplate(Map map) throws Exception {
		
		return templateManagerDAO.findTemplate(map);
	}

	public PaginatedResult findQueryTemplateList(Map map) throws Exception {
		
		return templateManagerDAO.findTemplateQueryResult(map);
	}

}

/**
 * Copyright © 2013,指尖科技 All rights reserved.
 */